package com.hutu.erp.catalog.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hutu.erp.catalog.mapper.ProductCombinationMapper;
import com.hutu.erp.catalog.domain.ProductCombination;
import com.hutu.erp.catalog.service.IProductCombinationService;

/**
 * 商品组合Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-05-24
 */
@Service
public class ProductCombinationServiceImpl implements IProductCombinationService 
{
    @Autowired
    private ProductCombinationMapper productCombinationMapper;

    /**
     * 查询商品组合
     * 
     * @param combinationId 商品组合ID
     * @return 商品组合
     */
    @Override
    public ProductCombination selectProductCombinationById(Long combinationId)
    {
        return productCombinationMapper.selectProductCombinationById(combinationId);
    }

    /**
     * 查询商品组合列表
     * 
     * @param productCombination 商品组合
     * @return 商品组合
     */
    @Override
    public List<ProductCombination> selectProductCombinationList(ProductCombination productCombination)
    {
        return productCombinationMapper.selectProductCombinationList(productCombination);
    }

    /**
     * 新增商品组合
     * 
     * @param productCombination 商品组合
     * @return 结果
     */
    @Override
    public int insertProductCombination(ProductCombination productCombination)
    {
        return productCombinationMapper.insertProductCombination(productCombination);
    }

    /**
     * 修改商品组合
     * 
     * @param productCombination 商品组合
     * @return 结果
     */
    @Override
    public int updateProductCombination(ProductCombination productCombination)
    {
        return productCombinationMapper.updateProductCombination(productCombination);
    }

    /**
     * 批量删除商品组合
     * 
     * @param combinationIds 需要删除的商品组合ID
     * @return 结果
     */
    @Override
    public int deleteProductCombinationByIds(Long[] combinationIds)
    {
        return productCombinationMapper.deleteProductCombinationByIds(combinationIds);
    }

    /**
     * 删除商品组合信息
     * 
     * @param combinationId 商品组合ID
     * @return 结果
     */
    @Override
    public int deleteProductCombinationById(Long combinationId)
    {
        return productCombinationMapper.deleteProductCombinationById(combinationId);
    }
}
